<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSS操作图片</title>
    <script type="text/javascript" src="https://unpkg.com/vue/dist/vue.js"></script>
    <style>
        #tree{
            position: absolute;
            left: 7.5em;
            top: 0em;
            cursor: pointer;
        }
        .fade-leave-active{
            transition: opacity .5s;
            opacity: 0;
        }
    </style>
</head>
<body>

<div id="app">
    <p>过渡是真棒，小心<br />
        请不要总是使用它们。</p>
    <transition name="fade">
        <img id="tree" src="http://i.imgur.com/QDpnaIE.png"
             v-show="show"
             @click="show=false" />
    </transition>
</div>

<script>
    new Vue({
        el: '#app',
        data:{
            show: true
        }
    })
</script>
</body>
</html>